/*! \file BufferImpl.h
 *	\brief <write description for BufferImpl.h>
 *
 *	created:	2010/12/12
 *	created:	12:12:2010   21:12
 *	filename: 	C:\src\tactics-engine\libs\gd_dx11\BufferImpl.h
 *	file path:	C:\src\tactics-engine\libs\gd_dx11
 *	file base:	BufferImpl
 *	file ext:	h
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#ifndef _gd_dx11_BUFFERIMPL_H_
#define _gd_dx11_BUFFERIMPL_H_

#pragma once

#include <gd/BufferImpl.h>
#include <utils/COMPointer.h>

namespace tt{
namespace gd_dx11{

class Device;

class BufferImpl : public gd::BufferImpl
{
public:
	BufferImpl();
	virtual ~BufferImpl();

protected:
	Result doCreate( Device* device, UInt dataType, UInt dataSize );

	utils::COMPointer<ID3D11Buffer>& buffer();

protected:
	virtual void onLock(gd::DeviceContext*);
	virtual void onUnlock(gd::DeviceContext*);

private:
	utils::COMPointer<ID3D11Buffer> m_buffer;
};

} //namespace gd_dx11
} //namespace tt

#endif //_gd_dx11_BUFFERIMPL_H_